/*
 * Copyright (c) gitee.com/jiandong001.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

export const enum YogaFlexDirection {
  COLUMN = 0,
  COLUMN_REVERSE = 1,
  ROW = 2,
  ROW_REVERSE = 3
}

export function getYogaFlexDirectionFromNumber(value: number): YogaFlexDirection {
  switch (value) {
    case 0: return YogaFlexDirection.COLUMN;
    case 1: return YogaFlexDirection.COLUMN_REVERSE;
    case 2: return YogaFlexDirection.ROW;
    case 3: return YogaFlexDirection.ROW_REVERSE;
    default: throw new Error("Unknown enum value: " + value);
  }
}

//
//
//export class YogaFlexDirection {
//  public static readonly COLUMN = 0
//  public static readonly COLUMN_REVERSE = 1
//  public static readonly ROW = 2
//  public static readonly ROW_REVERSE = 3
//
//  private readonly mIntValue: number;
//
//  constructor(intValue: number) {
//    this.mIntValue = intValue;
//  }
//
//  public intValue(): number {
//    return this.mIntValue;
//  }
//
//  public static fromNumber(value: number): number {
//    switch (value) {
//      case 0: return YogaFlexDirection.COLUMN;
//      case 1: return YogaFlexDirection.COLUMN_REVERSE;
//      case 2: return YogaFlexDirection.ROW;
//      case 3: return YogaFlexDirection.ROW_REVERSE;
//      default: throw new Error("Unknown enum value: " + value);
//    }
//  }
//}
